<%@ page pageEncoding="UTF-8"%>
<%@ include file="/include/taglibs.jsp"%>
<script type="text/javascript" src="${ctx}/script/jquery/jquery.form.js"></script>
<div id="quickLogin">
<div class="popup">
	<div class='frameTitle'>
		<div class='titleLeft'>
			<div class='titleRight'>
				<div class='titleCenter'>
					<div class='titleContent'>
						<div class='dialogTitleText'>快速登录</div>
						<div class='titleBtn'><a href='#' onclick="$.closePopupLayer('quickLogin')">关闭</a></div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="popup-body">
	<form id="quickLoginForm" action="${ctx}/user/systemUserAction!doQuickLogin.action" method="post" onKeyPress="javascript:onkeyDownQuickLoginEvent(event);">
	<div class="loginContent"><table style="margin:auto">
	<tr><td width="110px" align="right" height="50px"><div class="columnName">用户名或邮箱:</div></td><td width="220px"><input type="text" name="systemUser.username" id="username" class="columnInput" /></td></tr>
	<tr><td width="110px" align="right"><div class="columnName">密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码:</div></td><td width="220px"><input type="password" class="columnInput" id="password" name="systemUser.password" /></td></tr>
	<tr id="msgTr" style="display:none;"><td height="40px" ></td><td> <div style="float:left">用户名或密码错误,请重新输入</div></td></tr>
	<tr><td height="40px" ></td><td><input type="checkbox" value="01" name="rememberLogin"/> <div style="float:left">记住登录状态</div><div style="float:right">忘记密码了？</div></td></tr>
	<tr><td></td><td><div id="loginBtn"  class="loginBtn"   onclick="doQuickLogin();"><a href="#">登&nbsp;&nbsp;&nbsp;录</a></div></td></tr>
	<tr><td height="40px;"></td><td>还不是彩购部落会员？马上注册</td></tr>
	</table></div>
	</form>	
	</div>
	</div>
</div>
<script type="text/javascript">
function doQuickLogin(){
	if($("#username").val()!='' && $("#password").val()!=''){
		$("#msgTr").hide();
	  $('#quickLoginForm').ajaxSubmit(function(data) {
		    if(data=='01'){
		    //	window.location.href="${ctx}/homeAction!init.action?t_="+new Date().getTime();
		    	quickBuy();
		    	$.closePopupLayer('quickLogin');
		    }else{
		    	$("#msgTr").show();
		    }
      });
	}
}
function onkeyDownQuickLoginEvent(evt){
	 var evt=evt?evt:(window.event?window.event:null);//兼容IE和FF
	if(evt.keyCode ==13){
		doQuickLogin();
	}
}
</script>